package com.gas.gm.pdu;

import java.util.Vector;

public class DataProcessorContainer {
	
	private Vector<DataProcessor> processors;
	
	public DataProcessorContainer(){
		processors=new Vector<DataProcessor>();
	}

	public void add(DataProcessor d) {
		synchronized (processors) {
			if(!processors.contains(d))
				processors.add(d);
		}
		
	}
	public void remove(DataProcessor d) {
		synchronized (processors) {
			processors.remove(d);
		}
	}
	
	public DataProcessor get(int i){
		synchronized (processors) {
			return processors.get(i);
		}
	}

	public int size() {
		synchronized (processors) {
			return processors.size();
		}
	}

	
	

}
